#pragma once

/**
 * @file CD5XStatusMapSerilizer.h
 *
 * @brief This class is used to serilize and de-serlize filter status map
 *	@note not all filter status are supported!
 *
 * @author cygia.com
 * Contact: lance.liao@cygia.com
 *
 */

#include <map>
#include <vector>
#include <string>

typedef enum {
	IA_TAG_STATUS_MAP_TYPE_UNKNOWN = -1,
	IA_TAG_STATUS_MAP_TYPE_BALSER_CAMERA = 0,
	IA_TAG_STATUS_MAP_TYPE_HK_CAMERA ,
	IA_TAG_STATUS_MAP_TYPE_3D_SCANNER,
	IA_TAG_STATUS_MAP_TYPE_SERIAL_PORT,
	IA_TAG_STATUS_MAP_TYPE_STATION,
	IA_TAG_STATUS_MAP_TYPE_DISPATCHER,
	IA_TAG_STATUS_MAP_TYPE_SOCKET_CLIENT,
	IA_TAG_STATUS_MAP_TYPE_SN_DECODER
} ED5XStatusMapTypes;

class CD5XStatusMapSerilizer {
public:
	static ED5XStatusMapTypes DecideMapType(std::map<std::string, std::string>& statusMap, std::string& uuid);
	static ED5XStatusMapTypes DecideMapType(std::string msg, std::string& uuid);

	static int Serilizes(std::map<std::string, std::string>& statusMap, std::string& statusMsg);
	static int DeSerilize(const std::string msg, ED5XStatusMapTypes& msgType, std::map<std::string, std::string>& statusMap);

public:
	static int SplitString(std::string strText, char c, std::vector<std::string>& vector);
};